package com.algorithms.absdatatypes;

public class GEdge implements Comparable {

	private Integer vertexA;
	private Integer vertexB;
	private Double edgeWeight;
	
	public int compareTo(Object o) {
		if(o instanceof GEdge )
		{
			if((this.edgeWeight - ((GEdge)o).getEdgeWeight()) >0)
				return 1;
			else if((this.edgeWeight - ((GEdge)o).getEdgeWeight()) < 0)
				return -1;
			else 
				return 0;
		}
		throw new RuntimeException();
	}
	public Integer getVertexA() {
		return vertexA;
	}
	public void setVertexA(Integer vertexA) {
		this.vertexA = vertexA;
	}
	public Integer getVertexB() {
		return vertexB;
	}
	public void setVertexB(Integer vertexB) {
		this.vertexB = vertexB;
	}
	public Double getEdgeWeight() {
		return edgeWeight;
	}
	public void setEdgeWeight(Double edgeWeight) {
		this.edgeWeight = edgeWeight;
	}
	
	
}
